package com.gxa.modules.app.outpatient.medicalrecord.service.impl;

import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.gxa.modules.app.outpatient.medicalrecord.mapper.MedicalRecordMailingMapper;
import com.gxa.modules.app.outpatient.medicalrecord.service.MedicalRecordMailingService;
import com.gxa.modules.model.dto.InpatientDto;
import com.gxa.modules.model.entity.hospital.MedicalRecordMailing;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.Date;
import java.util.List;

/**
 * 作者 yuanqiufeng
 * Date 2022/11/14
 */
@Service
public class MedicalRecordMailingServiceImpl extends ServiceImpl<MedicalRecordMailingMapper, MedicalRecordMailing> implements MedicalRecordMailingService {

    @Autowired
    private MedicalRecordMailingMapper medicalRecordMailingMapper;

    @Override
    public List<MedicalRecordMailing> queryAll( Integer accountId, Date startDate, Date endDate) {
        List<MedicalRecordMailing> medicalRecordMailingList = this.medicalRecordMailingMapper.queryAll(accountId,startDate,endDate);
        return medicalRecordMailingList;
    }

    @Override
    public InpatientDto queryInpatientDetailById(String inpatientNum) {
        InpatientDto mInpatientDetialVo = this.medicalRecordMailingMapper.queryInpatientDetailById(inpatientNum);
        return mInpatientDetialVo;
    }

    @Override
    public void addMedicalRecordMailing(MedicalRecordMailing medicalRecordMailing) {
         this.medicalRecordMailingMapper.addMedicalRecordMailing(medicalRecordMailing);
    }

    @Override
    public MedicalRecordMailing queryById(Integer id) {
        MedicalRecordMailing medicalRecordMailing = this.medicalRecordMailingMapper.queryById(id);
        return medicalRecordMailing;
    }
}
